﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace DARE
{
    /// <summary>
    /// This is a simple color mask.
    /// </summary>
    [AttrTypeDependentSerializable(typeof(CMaskData))]
    public class CMask : CWidget
    {
        #region fields

        /// <summary>
        /// Gets/Sets the color of the mask
        /// </summary>
        public override Color Color
        {
            get { return base.Color; } 
            set 
            {
                base.Color = value;
                m_texture = new CHudTexture();
                m_texture.Body = new Microsoft.Xna.Framework.Graphics.Texture2D(CDare.Instance.GraphicsDevice, 1, 1);
                Color[] c = new Color[1] { base.Color };
                m_texture.Body.SetData(c);
            }
        }

        #endregion

        #region ctor
        public CMask(CHUDSystem hud, CWidget parent, string name)
            : base(hud, parent, name)
        {
        }
        #endregion
    }
}
